import Vue from "vue";
import App from "./App.vue";
import VueRouter from "vue-router";

//路由相关
import Home from "./components/sy/sy.vue";
import Msg from "./components/sy/msg.vue";
import Znzx from "./components/znzx/znzx.vue";
import Fwzx from "./components/fwzx/fwzx.vue";
import Sqhd from "./components/sqhd/sqhd.vue";
import Xxzx from "./components/xxzx/xxzx.vue";
import Test from "./components/sy/test.vue";
import Test2 from "./components/sy/test2.vue";
import TestHttp from "./components/sy/testHttp.vue";

Vue.use(VueRouter);

const routes = [
    {path: '/home', component: Home},
    {path: '/znzx', component: Znzx},
    {path: '/fwzx', component: Fwzx},
    {path: '/sqhd', component: Sqhd},
    {path: '/xxzx', component: Xxzx},
    {path: '/msg', component: Msg},
    {path: '/test', component: Test2},
    {path: '/testHttp', component: TestHttp},
    {path: '*', redirect: '/home'},
]
const router = new VueRouter({routes, mode: 'history'});

//mint相关
import {Toast} from "mint-ui";
import { Button, Cell } from 'mint-ui';
import { Indicator } from 'mint-ui';
import { Loadmore } from 'mint-ui';
import { Popup } from 'mint-ui';
import { Header } from 'mint-ui';

Vue.component(Header.name, Header);
Vue.component(Popup.name, Popup);
Vue.component(Button.name, Button);
Vue.component(Cell.name, Cell);

//element相关
import Element from 'element-ui';
Vue.use(Element);

//element相关
import Resource from "vue-resource";
Vue.use(Resource);

new Vue({
    el: '#app',
    router: router,
    render: h => h(App)
})
